1 00:00:00,630 --> 00:00:09,320 Hello and welcome to the part two of this functionality for the app using javascript. 2 00:00:09,600 --> 00:00:17,350 I have added a chunk of could here from line 92 to a hundred and twelve. 3 00:00:17,360 --> 00:00:29,120 This function here will display the corrent question and the choicest saw line 94. 4 00:00:29,340 --> 00:00:35,730 I DOING A consider lock up past it in this play corrinne question. 5 00:00:35,730 --> 00:00:40,950 So when the current question is display it will show it on the console on the screen. 6 00:00:41,190 --> 00:00:49,330 Line 9 to six declared the variable here court question and set it to cause 2 questions and then pass 7 00:00:49,360 --> 00:00:58,300 it an array of corrent question dot QUESTION So that's the horacio you pick up the questions from that 8 00:00:58,410 --> 00:00:59,050 read. 9 00:00:59,280 --> 00:01:04,730 We remember we we define a variable at the very beginning. 10 00:01:04,740 --> 00:01:06,100 Call questions. 11 00:01:06,240 --> 00:01:14,520 Okay so and we also define some more variables here like 55 will go a variable Kwas Coran question and 12 00:01:14,520 --> 00:01:20,620 we've got one called Current answers so those are the variables it's referring to. 13 00:01:20,910 --> 00:01:24,240 Alright so you say is variable. 14 00:01:24,240 --> 00:01:32,070 Question you asked a question which is that variable and is passed it current question What question. 15 00:01:32,200 --> 00:01:36,920 Variable question class again equals to. 16 00:01:37,150 --> 00:01:38,620 Could we see a dollar sign. 17 00:01:38,620 --> 00:01:42,960 Joe query it cause to this method again he picks up the list. 18 00:01:42,960 --> 00:01:48,370 This is the container contained under wraps did not contain. 19 00:01:48,560 --> 00:01:57,790 If so if this container is greater than the question then 98 with God. 20 00:01:57,830 --> 00:02:00,390 Choice is the variable called choices. 21 00:02:00,420 --> 00:02:09,210 Again if that method dot quiz is greater than choice list these are what the what the various variables 22 00:02:09,210 --> 00:02:10,130 are being defined. 23 00:02:10,200 --> 00:02:12,860 And these are the values. 24 00:02:13,080 --> 00:02:19,430 Here we use invis here to set the question class again. 25 00:02:19,440 --> 00:02:24,200 This here is a comment of just porkier squoze don't class. 26 00:02:24,230 --> 00:02:26,080 Don't text or question. 27 00:02:26,280 --> 00:02:30,120 This will remove all corrent. 28 00:02:30,180 --> 00:02:32,640 I elma's if there's any Okay. 29 00:02:32,670 --> 00:02:33,780 That's what this means. 30 00:02:33,780 --> 00:02:38,220 Choice does find a lie and then remove them here. 31 00:02:38,250 --> 00:02:42,020 Variable one of several variable choice. 32 00:02:42,180 --> 00:02:43,250 Got a loopier. 33 00:02:43,250 --> 00:02:45,140 Same for hi. 34 00:02:45,210 --> 00:02:54,690 The first vote equals the 0 and the II is less than number of choices and then increase as to increase 35 00:02:54,690 --> 00:02:56,430 the question by 1. 36 00:02:56,490 --> 00:03:03,360 If the choice is equal to the questions choring questions or choices you posted I will seise the represents 37 00:03:03,750 --> 00:03:07,020 Behi as accountant who represents one. 38 00:03:07,020 --> 00:03:14,860 So here again we isn't a dollar sign and this the fly list is and the airline is list too. 39 00:03:14,880 --> 00:03:19,900 It puts a radio button and can't say to the radio button. 40 00:03:19,950 --> 00:03:26,040 Each time their choice is made and then it upends it to the list. 41 00:03:26,190 --> 00:03:28,000 Okay it your choice is this me. 42 00:03:28,180 --> 00:03:31,840 Yeah penza to the list. 43 00:03:31,870 --> 00:03:38,810 The final function I've added here is from line a hundred and twelve to a hundred twenty five is a function 44 00:03:39,020 --> 00:03:45,350 called Reset quizes function will reset the quiz and enable you to start again. 45 00:03:45,540 --> 00:03:51,580 So the reason this is what will happen when the quiz is reset. 46 00:03:51,810 --> 00:03:53,880 The current question is silly. 47 00:03:53,880 --> 00:03:57,650 The common question is of course zero correct answer is of course zero. 48 00:03:57,660 --> 00:03:59,400 It will hide the score. 49 00:03:59,400 --> 00:04:00,630 It will call this function. 50 00:04:00,630 --> 00:04:06,200 This function is called function or method called high score so it will hide the school. 51 00:04:06,540 --> 00:04:14,970 And then here on the function function call displays from on here would display the score is seen if 52 00:04:14,970 --> 00:04:23,020 the document of fine container is greater than the result text. 53 00:04:23,060 --> 00:04:32,800 Then it displays this text to see if you scored x an x amount plus correlli Display what you do display 54 00:04:32,820 --> 00:04:36,370 that text that says you scored pylos. 55 00:04:36,390 --> 00:04:44,760 The correct answer you've answer plots out of question for example you will say he scored five out of 56 00:04:45,180 --> 00:04:46,800 his gold for score. 57 00:04:46,800 --> 00:04:51,040 So for example four questions how 12 eight. 58 00:04:51,330 --> 00:04:53,430 Okay that's what that means. 59 00:04:53,430 --> 00:04:59,490 And then he does the same thing and then he shows a result using this show method he shows. 60 00:04:59,620 --> 00:05:05,970 We resolved here after a displeased that then what a function called Hyde score. 61 00:05:06,100 --> 00:05:12,270 This world used a document dump find resolved and it will hide the result. 62 00:05:12,490 --> 00:05:19,990 So all those functions would be used in various parts of the could sort of that's or the court for the 63 00:05:19,990 --> 00:05:23,120 functionality for the queen's hat. 64 00:05:23,390 --> 00:05:27,420 If you have any questions please let me know. 65 00:05:27,730 --> 00:05:29,130 So these are all the code. 66 00:05:29,130 --> 00:05:31,330 Is there any parcel that you don't understand. 67 00:05:31,330 --> 00:05:32,430 Please let me know. 68 00:05:32,670 --> 00:05:33,910 So let's see it. 69 00:05:33,910 --> 00:05:34,990 Thanks for watching. 70 00:05:34,990 --> 00:05:35,960 Bye for now.